import {http} from '@/utils/request.js'

// 轮播图
export function fetchList(query) {
  return http('/api/bannerList','get')
}
// 新品上市
export function leftreact(query) {
  return http('/api/goods/is_new/1','get')
}
// 为您推存
export function depositList(id) {
	// console.log(id,'ddd')
  return http(`/api/goods/is_recommend/${id}`,'get')//1111
}
// 详情页面
export function particulars(id) {
	console.log(id)
  return http(`/api/goods/detail/${id}`,'get')
}
// 搜索
export function search(name) {
	console.log(name,1111)
  return http(`/api/goods/search/1/${name}`,'get')
}
// 列表详情
export function listParticulars(id) {
	console.log(id,1234567)
  return http(`/api/goods/getMenuGoodsList/1/${id}`,'get')
}
// 输入手机号登录   手机号登录 
export function MobilePhoneLogin(value) {
	console.log(value,1234567)
  return http(`/api/login?phone=${value}`,'post')
}
// 购物车列表
export function ShoppingCartList(member_id) {
	console.log(member_id,1234567)
  return http(`/api/getCartList?member_id=${member_id}`,'get')
}
// add购物车
export function ShoppingAdd(data) {
	console.log(data,1111111)
  return http(`/api/addcart?member_id=${data.member_id}&sku_sname=${data.goods_remark}&price=${data.shop_price}&goods_id=${data.goods_id}&goods_name=${data.goods_name}&number=${data.sales_sum}&goods_img=${data.original_img}`,'post')
}
// 购物车删除
export function ShoppingDelete(id) {
	console.log(id,1111111)
  return http(`/api/deletecart?id=${id}`,'get')
}